10 REM ******************** DEPRECIATION PROGRAM ******************************
20 REM ************ REVISED FOR ECONOMIC RECOVERY ACT OF 1981 *****************
30 REM ****  BY A.P GITT; POPULAR COMPUTING ,DEC. 1982, PAGE 59  **************
40 REM ****  REVISED: 01/09/82                                         ********
50 REM ****  DISK FILE NAME: DEPREC.BAS                                ********
60 REM ****  FURTHER REVISED BY C.F. MITASIK ON 11-16-82 TO INCLUDE    ********
70 REM ****    10 YEAR ACRS AND THE 15 YEAR, 175% DEPRECIATION OPTION  ********
80 REM ****    FOR REAL PROPERTY                                       ********
90 REM ************************************************************************
100 REM ***  NOTE: HOME COMPUTERS WOULD USUALLY BE WRITTEN OFF USING   ********
110 REM ***        5 YEAR ACRS; UNLESS IT IS BEING USED FOR RESEARCH   ********
120 REM ***        AND DEVELOPMENT WORK IN WHICH CASE THE 3 YEAR ACRS  ********
130 REM ***        METHOD MAY BE USED.                                 ********
140 REM ***********************************************************************
150 REM ***  WARNING: NO GUARENTEES ARE GIVEN OR IMPLIED REGARDING     ********
160 REM ***  YOUR USE OF THIS PROGRAM. I ALSO TAKE NO RESPONSIBILITY   ********
170 REM ***  FOR THE DEPRECIATION METHOD(S) YOU CHOOSE TO USE OR FOR   ********
180 REM ***  WHETHER OR NOT YOUR PROPERTY IS IN FACT DEPRECIABLE.      ********
190 REM ***  PLEASE CONSULT A KNOWLEDGEABLE TAX SPECIALIAST FOR        ********
200 REM ***  ASSISTANCE ALONG THESE LINES.                             ********
210 REM ***********************************************************************
220 REM
230 CLEAR 2000:KEY OFF
240 DIM D(40)
250 COLOR 2,0,0:CLS:LOCATE 10,32:PRINT "TAX DEPRECIATION"
260 FOR I = 1 TO 1500:NEXT I:CLS
270 REM ****************** INPUT DATA *****************************************
280 LOCATE 2,1:INPUT "NAME OF ITEM";I$
290 A = 0:B = 0:F = 0:F1 = 0:D(1) = 0:A9$ = ""
300 DP$ = DATE$
310 PRINT "TODAYS DATE = ";DP$
320 INPUT "PURCHASE DATE (MM/DD/YY)";D$
330 INPUT "COST OF ITEM";C
340 PRINT "DO YOU WISH TO USE THE ACCELERATED COST"
350 INPUT "RECOVERY SYSTEM (ACRS)? (Y)ES OR (N)O";A9$
360 GOTO 530
370 IF YY < 81 THEN A = 1
380 INPUT "USEFUL LIFE";L
390 INPUT "DEPRECIATION RATE (NEW = 200% : USED = 150%)";R
400 R$ = STR$(R)+"%"
410 REM ******************* CALCULATE YEARLY RATE ****************************
420 YR = R/(100*L)
430 REM ****************** CALCULATE EXTRA 1ST YEAR DEPRECIATION *************
440 IF L > 6 AND YY < 81 THEN ED = .2*C ELSE ED = 0
450 CV = C - ED
460 REM ****************** CALCULATE INVESTMENT CREDIT ************************
470 IF L < 3 THEN IC = 0
480 IF L >= 3 THEN  IC = C/30
490 IF L >= 5 THEN  IC = C/15
500 IF L >= 7 THEN  IC = C/10
510 GOTO 610
520 REM ***************** DETERMINE YEAR/DAY/MONTH ****************************
530 MM = VAL (LEFT$(D$,2))
540 DD = VAL (MID$(D$,4,2))
550 YY = VAL (RIGHT$(D$,2))
560 IF DD >< 15 THEN FY = 13 - MM ELSE FY = 12 - MM
570 LY = 12 - FY
580 IF YY < 81 AND A9$ = "Y" OR A9$ = "YES" THEN PRINT:PRINT "ACRS ONLY VALID ";    "FOR PROPRETY PURCHASED AFTER 1980. PLEASE START AGAIN.":GOTO 280
590 IF YY < 81 OR A9$ = "N" THEN 370 ELSE 1570
600 REM ******************* FIRST YEAR DEPRECIATION **************************
610 CY = 1
620 D(CY) = CV*YR*(FY/12)
630 CV = CV - D(CY)
640 REM ******************* MIDDLE YEARS DEPRECIATION *************************
650 FOR CY = 2 TO L
660    D(CY) = YR*CV
670    CV = CV - D(CY)
680 NEXT
690 REM ******************* LAST YEAR DEPRECIATION ****************************
700 IF CY = 0 THEN 730 ELSE CY = L + 1
710 D(CY) = YR*CV*(LY/12)
720 CV = CV - D(CY)
730 REM ******************* OUTPUT TO VIDIO ***********************************
740 CLS
750 LOCATE 3,15:PRINT "DEPRECIATION ANALYSIS FOR ";I$
760 LOCATE 4,15:PRINT "DATE PREPARED: ";DP$
770 REM
780 LOCATE 6,1:PRINT "ITEM NAME: ";TAB(31);I$
790 PRINT "DATE OF PURCHASE: ";TAB(31);D$
800 PRINT "COST: ";TAB(30);C
810 PRINT "USEFULL LIFE: ";TAB(30);L
820 PRINT "DEPRECIATION RATE: ";TAB(30);R$
830 PRINT
840 CY = 1
850 Y = 1899 + YY
860 INPUT "PRESS ENTER TO CONTINUE",Z$:CLS
870 PRINT
880 IF B = 1 THEN 940
890 PRINT :PRINT " YEAR";TAB(10);"INVESTMENT CREDIT";
900 IF A = 1 AND ED >< 0 THEN PRINT TAB(35);"EXTRA FIRST YEAR DEPRECIATION"
910 IF A = 0 THEN PRINT
920 PRINT TAB(2);TY+CY;TAB(12);IC;
930 IF A = 1 AND ED >< 0 THEN PRINT TAB(39);ED ELSE PRINT CHR$(10)
940 PRINT:PRINT " YEAR";TAB(10)"DEPRECIATION":PRINT
950 IF R1 = 1 THEN 1060
960 IF F1 = 1 THEN 1000
970 IF F = 1 THEN 990
980 IF A = 1 THEN 990 ELSE 1000
990 IF LY = 0 THEN 1000 ELSE 1010
1000 LOOP = L:GOTO 1020
1010 LOOP = L + 1
1020 FOR CY = 1 TO LOOP
1030 PRINT TAB(2);TY+CY;TAB(11);:PRINT USING "######.##";D(CY)
1040 IF CY = 10 OR CY = 20 OR CY = 30 THEN PRINT:PRINT "PLEASE PRESS ENTER TO";      " CONTINUE";:INPUT " ",Z$ ELSE 1070
1050 CLS:R1 = 1:PRINT :GOTO 940
1060 R1 = 0
1070 NEXT
1080 IF CV <= 0 THEN 1120
1090 PRINT
1100 IF A = 1 THEN 1110 ELSE 1120
1110 PRINT "SALVAGE VALUE AT END OF";CY +Y-1;" IS ";CV
1120 REM ******************* PRINTOUT ROUTINE **********************************
1130 PRINT:PRINT:INPUT "DO YOU WANT A PRINTOUT";Z$
1140 IF LEFT$(Z$,1) = "Y" THEN 1150 ELSE 10
1150 POKE 16424,65:POKE 16425,0:LPRINT :LPRINT :LPRINT
1160 T = 40 - (12+((LEN(I$))/2))
1170 LPRINT TAB(T);"DEPRECIATION ANALYSIS FOR ";I$
1180 LPRINT :LPRINT TAB(32);"DATE PREPARED: ";DP$
1190 LPRINT :LPRINT TAB(6);"INPUT DATA"
1200 LPRINT TAB(6);"----------"
1210 LPRINT :LPRINT TAB(6);"DATE OF PURCHASE: ";TAB(32);D$
1220 LPRINT TAB(6);"COST OF ITEM: ";TAB(32);"$";C
1230 LPRINT TAB(6);"USEFULL LIFE: ";TAB(32);L;"YEARS"
1240 LPRINT TAB(6);"DEPRECIATION RATE: ";TAB(31);R$
1250 LPRINT
1260 LPRINT TAB(6);"DEPRECIATION CALCULATIONS"
1270 LPRINT TAB(6);"-------------------------"
1280 LPRINT
1290 Y = 1899+YY
1300 IF B = 1 THEN 1410
1310 IF A = 1 THEN LPRINT TAB(6);" YEAR";TAB(16);"INVESTMENT CREDIT";
1320 IF A = 1 AND ED >< 0 THEN LPRINT TAB(37);"EXTRA FIRST YEAR DEPRECIATION"
1330 IF F = 1 THEN LPRINT TAB(6);" YEAR";TAB(16);"INVESTMENT CREDIT"
1340 IF A = 1 THEN LPRINT TAB(6);" ----";TAB(16);"-----------------";
1350 IF A = 1 AND ED >< 0 THEN LPRINT TAB(37);"-----------------------------"
1360 IF F = 1 THEN LPRINT TAB(6);" ----";TAB(16);"-----------------"
1370 CY = 1
1380 IF A = 1 THEN LPRINT TAB(6);Y+CY;:LPRINT TAB(16)USING"$$######.##";IC;
1390 IF A = 1 AND ED >< 0 THEN LPRINT TAB(37)USING "$$######.##";ED
1400 IF F = 1 THEN LPRINT TAB(6);Y+CY;:LPRINT TAB(16)USING "$$######.##";IC
1410 LPRINT:LPRINT TAB(6);" YEAR";TAB(16);"DEPRECIATION"
1420 LPRINT TAB(6);" ----";TAB(16);"------------"
1430 IF F = 1 THEN 1470
1440 IF F = 1 THEN 1480
1450 IF A = 1 THEN 1460 ELSE 1470
1460 IF LY = 0 THEN 1470 ELSE 1480
1470 LOOP = L:GOTO 1490
1480 LOOP = L+1
1490 FOR CY = 1 TO LOOP
1500 LPRINT TAB(6);Y+CY;:LPRINT TAB(16)USING "$$######.##";D(CY)
1510 NEXT CY
1520 IF CV <= 0 THEN 1540
1530 LPRINT :LPRINT TAB(6);"SALVAGE VALUE AT END OF";CY+Y-1; " IS ";:LPRINT          USING"$$######.##";CV
1540 POKE 14312,12
1550 INPUT "DO YOU WANT ANOTHER PRINTOUT ";Z$
1560 IF Z$ = "Y" THEN 1120 ELSE 10
1570 REM ****************** DETERMINE YEAR/TYPE DEPRECIATION ******************
1580 CLS:PRINT:PRINT "PLEASE SELECT TYPE OF DEDUCTION/DEPRECIATION THAT YOU ";       "WANT":PRINT:PRINT
1590 PRINT TAB(10);"1 MAXIMUM SHORT TERM DEDUCTIONS/DEPRECIATION"
1600 PRINT
1610 PRINT TAB(10);"2 LONG TERM DEPRECIATION"
1620 PRINT:PRINT
1630 INPUT "PLEASE ENTER THE NUMBER OF YOUR SELECTION: ",Z7
1640 IF YY = 81 THEN 1690
1650 IF YY = 82 OR YY = 83 THEN 1720
1660 IF YY = 84 OR YY = 85 THEN 1820
1670 IF YY > 85 THEN 1930
1680 REM ********************* 1981 DEPRECIATION ******************************
1690 ED = 0:C1 = C
1700 IF Z7 = 1 THEN 2170 ELSE 2580
1710 ************************* 1982/83#EPRECIATION ***************************
1720 ED = 0:C1 = 0
1730 IF Z7 = 1 THEN 1740 ELSE 2580
1740 IF C > 5000 THEN D(1) = 5000 ELSE 1780
1750 IF C > 5000 THEN C1 = C
1760 IF C > 5000 THEN C = C - 5000
1770 GOTO 2170
1780 R$ = " 100% WRITE OFF"
1790 IF C < 5001 THEN D(1) = C
1800 B = 1
1810 GOTO 730
1820 REM ********************* 1984/85 DEPRECIATION ***************************
1830 ED = 0:C1 = C
1840 IF Z7 = 1 THEN 1850 ELSE 2580
1850 IF C > 7500 THEN D(1) = 7500 ELSE 1890
1860 IF C > 7500 THEN C1 = C
1870 IF C > 7500 THEN C = C - 7500
1880 B = 1:GOTO 2170
1890 IF C < 7501 THEN  D(1) = C ELSE 2170
1900 R$ = " 100$ WRITE OFF"
1910 B = 1
1920 GOTO 730
1930 REM ********************** 1986 AND BEYOND DEPRECIATION ******************
1940 ED = 0:C1 = C
1950 IF Z7 = 1 THEN 1960 ELSE 2580
1960 IF C > 10000 THEN D(1) = 10000 ELSE 2000
1970 IF C > 10000 THEN C1 = C
1980 IF C > 10000 THEN C = C - 10000
1990 B = 1:GOTO 2170
2000 IF C < 10001 THEN D1 = C ELSE 2170
2010 R$ = " 100% WRITE OFF"
2020 B = 1
2030 GOTO 730
2040 REM ********************** 5 YEAR ASSET COST RECOVERY SYSTEM *************
2050 CY = 1:F1 = 1
2060 D(CY) = D(1) + C*.15
2070 CY = 2
2080 D(CY) = .22*C
2090 FOR CY = 3 TO 5
2100 D(CY) = .21*C
2110 NEXT CY
2120 CV = 0
2130 IC = .1*C
2140 F = 1:C = C1
2150 R$ = " ASSET RECOVERY SYSTEM"
2160 GOTO 730
2170 REM ******************** ACCELERATED USEFULL LIFE SELECTION **************
2180 CLS:PRINT :PRINT "PLEASE SELECT TYPE OF LIFE/USE FROM THE FOLLOWING LIST"
2190 PRINT :PRINT
2200 PRINT TAB(10);"1) 3 YEAR CLASS PROPERTY (AUTO'S,LIGHT TRUCKS,MACHINERY,";       "R&D EQUIPMENT)"
2210 PRINT
2220 PRINT TAB(10);"2) 5 YEAR CLASS PROPERTY (COMPUTERS, MOST OFFICE FURNITURE,"     ;" HEAVY DUTY",TAB(19);"TRUCKS & MACHINERY,AGRICULTURAL STRUCTURES)"
2230 PRINT
2240 PRINT TAB(10);"3) 10 YEAR CLASS PROPERTY (PUBLIC UTILITY & RAILROAD ";          "PROPERTY",TAB(19);"AND SOME REAL PROPERTY)"
2250 PRINT
2260 PRINT TAB(10);"4) 15 YEAR CLASS PROPERTY (MOSTLY PUBLIC UTILITIES)"
2270 PRINT
2280 PRINT TAB(10);"5) 15 YEAR, 175% DEP. RATE FOR REAL PROPERTY"
2290 PRINT :PRINT
2300 INPUT "PLEASE ENTER THE NUMBER OF YOUR SELECTION: ",Z
2310 IF Z = 1 THEN L = 3:GOTO 2490
2320 IF Z = 2 THEN L = 5:GOTO 2040
2330 IF Z = 3 THEN L = 10:GOTO 2690
2340 IF Z = 4 THEN L = 15:GOTO 3130
2350 IF Z = 5 THEN L = 15:GOTO 2870
2360 IF Z > 5 THEN 2170
2370 REM ******************* STRAIGHT LINE DEPRECIATION ***********************
2380 IC = .1*C:ED = 0
2390 F = 1
2400 CY = 1
2410 D(CY) = C/L*(FY/12)
2420 FOR CY = 2 TO L
2430    D(CY) = C/L
2440 NEXT CY
2450 CY = L+1
2460 D(CY) = C/L*(LY/12)
2470 R$ = " STRAIGHT LINE"
2480 GOTO 730
2490 REM ****************** 3 YEAR ACRS ***************************************
2500 F1 = 1
2510 D(1) = D(1) + .25*C
2520 D(2) = .38*C
2530 D(3) = .37*C
2540 CV = 0:IC = .06*C:F = 1:R$ = " ASSET COST RECOVERY SYSTEM"
2550 C = C1
2560 GOTO 730
2570 END
2580 REM ************ LONG TERM USEFUL LIFE SELECTION *************************
2590 CLS:PRINT:PRINT "PLEASE SELECT TYPE OF USEFULL LIFE FROM THE FOLLOWING ";       "LIST"
2600 PRINT TAB(10);"1 LONG TERM - 12 YEARS"
2610 PRINT TAB(10);"2 LONG TERM - 25 YEARS"
2620 PRINT "PLEASE ENTER NUMBER OF YOUR SELECTION"
2630 INPUT Z
2640 IF Z = 1 THEN L = 12:GOTO 2370
2650 IF Z = 2 THEN L = 25:GOTO 2370
2660 IF Z > 2 THEN 2580
2670 GOTO 2580
2680 REM ****************** 10 YEAR ACRS **************************************
2690 F1 = 1:CY = 1
2700 D(CY) = D(1) + .08*C
2710 CY = 2
2720 D(CY) = .14*C
2730 CY = 3
2740 D(CY) = .12*C
2750 FOR CY = 4 TO 6
2760    D(CY) = 9.999999E-02*C
2770 NEXT
2780 FOR CY = 7 TO 10
2790    D(CY) = 8.999999E-02*C
2800 NEXT
2810 CV = C
2820 IC = C/10
2830 F = 1:C = C1
2840 R$ = "ASSET RECOVERY SYSYEM"
2850 GOTO 730
2860 REM ********************* 15 YEAR, 175% REAL PROPERTY *******************
2870 FY = 13 - MM
2880 LY = 12 - FY
2890 R$ = " 175% ACRS FOR REAL PROPERTY"
2900 A = 1:ED = 0
2910 CV = 0
2920 C = C1:IC = 0
2930 RESTORE
2940 FOR J = 1 TO MM
2950    FOR I = 1 TO 16:READ D(I):NEXT I
2960 NEXT J
2970 FOR I = 1 TO 16
2980    D(I) = C*D(I)/100
2990 NEXT I
3000 GOTO 700
3010 DATA 12,10,9,8,7,6,6,6,6,5,5,5,5,5,5,0
3020 DATA 11,10,9,8,7,6,6,6,6,6,5,5,5,5,5,0
3030 DATA 10,11,9,8,7,6,6,6,6,5,5,5,5,5,5,1
3040 DATA  9,11,9,8,7,6,6,6,6,6,5,5,5,5,5,1
3050 DATA 8,11,10,8,7,7,6,6,5,5,5,5,5,5,5,2
3060 DATA 7,11,10,8,7,7,6,6,6,5,5,5,5,5,5,2
3070 DATA 6,11,10,9,8,7,6,5,5,5,5,5,5,5,5,3
3080 DATA 5,11,10,9,8,7,6,6,5,5,5,5,5,5,5,3
3090 DATA 4,11,10,9,8,7,6,6,5,5,5,5,5,5,5,4
3100 DATA 3,11,10,9,8,7,6,6,6,5,5,5,5,5,5,4
3110 DATA 2,11,10,9,8,7,6,6,6,6,5,5,5,5,5,4
3120 DATA 1,12,10,9,8,7,6,6,6,5,5,5,5,5,5,5
3130 REM *********************** 15 YEAR ACRS *********************************
3140 CY = 1
3150 F1 = 1
3160 D(CY) = D(1) + .05*C
3170 CY = 2
3180 D(CY) = 9.999999E-02*C
3190 CY = 3
3200 D(CY) = 8.999999E-02*C
3210 CY = 4
3220 D(CY) = .08*C
3230 FOR CY = 5 TO 6
3240    D(CY) = .07*C
3250 NEXT
3260 FOR CY = 7 TO 15
3270    D(CY) = .06*C
3280 NEXT
3290 CV = 0
3300 IC = .1*C
3310 F = 1:C = C1
3320 R$ = "ASSET RECOVERY SYSTEM"
3330 GOTO 730
